package com.bsbc.project.enums;

public enum GenderEnum {

    MALE("1","男"),
    FEMALE("2","女");

    private String code;

    private String desc;

    GenderEnum(String code, String desc){
        this.code = code;
        this.desc = desc;
    }

    public String getDescByCode(String code) {
        for (GenderEnum value : values()) {
            if (value.code.equals(code)){
                return value.desc;
            }
        }
        return null;
    }

}
